<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
			<meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no">
		<title>我的订单</title>
        <link rel="stylesheet" href="__PUBLIC__/css/frozen.css" />
        <link rel="stylesheet" href="__PUBLIC__/css/iconfont.css" />
        <link rel="stylesheet" href="__PUBLIC__/css/myCss.css" />
        <script src="__PUBLIC__/lib/zepto.min.js"></script>
		<script src="__PUBLIC__/js/frozen.js"></script>
        <script src="__PUBLIC__/js/myjs/Order.js"></script>
        <script>
            var handleUrl="__INDEX__";
        </script>
		<style>
            select{
                color:#555;
                font-size:18px;
                padding:10px;
            }
		</style>
	</head>

	<body>
		<header class="ui-header ui-header-stable ui-border-b">
            <ul class="ui-tiled">
                <li><i class="ui-icon-return" onclick="history.back()"></i></li>
                <li>
                    <div class="ui-select">
                        <select onchange="betweenOrder(this.value);" >
                            <option value='0'  >今日订单</option>
                            <option value='7' >本周订单</option>
                            <option value='11' >本月订单</option>
                            <option value='12'>今年订单</option>
                            <option value='-1'  selected>全部订单</option>
                        </select>
                    </div>
                </li>
                <li style="-webkit-box-align: inherit;text-align:right;" ><i  class="iconfont icon-31shuaxin" onclick="location.reload(true); "></i></li>
            </ul>
		</header>
		<footer class="ui-footer ui-footer-stable ui-border-t ui-footer-my" >
            <div style="display:none;"  class="ui-input-wrap">
                 <i id="i_VLevel" style="font-size:30px;margin-right:0px;margin-left:5px;" class="iconfont icon-pingjiahaoping"  onclick="gradeSwitch(this);"></i>
                <div class="ui-input ui-border-radius" style="margin:7px 5px;">
                    <input  id="vContent" type="text" placeholder="我也说一句...">
                </div>
                <button onclick="proValuation(this);"  class="ui-btn" style="color:#777;">评价</button>
            </div>
            <ul class="ui-tiled">
                <li onclick="location.href='{:U('Index/index','','',0,true)}'" >
                    <div class="iconfont icon-home"></div>
                </li>
                <li onclick="location.href='{:U('Index/ProductList','','',0,true)}'" >
                    <div class="iconfont icon-shop"></div>
                </li>
                <li onclick="location.href='{:U('Index/MyShop','','',0,true)}'">
                    <div class="iconfont icon-people"></div>
                </li>
            </ul>
		</footer>
		<section class="ui-container">
            <!--订单分类栏-->
            <div class="ui-tab">
                <ul class="ui-tab-nav ui-border-b">
                    <li>待付款<div id="menu1_flag" ></div></li>
                    <li>待发货<div id="menu2_flag" ></div></li>
                    <li>已发货<div id="menu3_flag" ></div></li>
                    <li>已完成<div id="menu4_flag" ></div></li>
                </ul>
                <ul class="ui-tab-content" style="width:300%;margin-top:10px;">
                    <!--待付款-->
                    <li class="flagax">
                        <foreach name="oList1" item="v">
                            <div class="ui-form ui-border-t" style="margin-top:-1px;">
                                <div id="div_menu{$v.OrderId}" class="ui-form-item ui-form-item-show ui-border-b" onclick="hiDiv(this);">
                                    <label for="#">订单编号：</label>
                                    <input style="font-size:13px;width:60%;color:#444;" type="text" value="#{$v.OrderId}" readonly>
                                    
                                    <p   style="float:right;color:#999;font-size:0.12rem;">{$v.CreateDate|date='m-d H:i',###}</p>
                                </div>
                                <div id="order_Info{$v.OrderId}" style="display:none;">
                                    <div >
                                        <foreach name="v[0]" item="sv">
                                            <ul class="ui-list ui-list-one ui-border-tb" style="border-top:0px;" >
                                                <li class="ui-border-t" >
                                                    <div class="ui-list-thumb">
                                                        <span onclick="GotoProDetail({$sv.ProId});" style="background-image:url('__PUBLIC__/images/img/{$sv.ProImg}')"></span>
                                                    </div>
                                                    <div class="ui-list-info">
                                                        <h4 onclick="GotoProDetail({$sv.ProId});" class="ui-nowrap">{$sv.ProName}</h4>
                                                        <div class="ui-txt-info">{$sv.ProCount} * {$sv.ProPrice}</div>
                                                    </div>
                                                </li>
                                            </ul>
                                        </foreach>
                                    </div>
                                    <div class="ui-form-item ui-form-item-show ui-border-b">
                                        <label for="#" style="font-size:0.123rem;">收货地址：</label>
                                        <input type="text" value="{$v.Address}" readonly>
                                    </div>
                                    <div class="ui-form-item ui-form-item-show ui-border-b">
                                        <label for="#">收件人：</label>
                                        <input type="text" value="{$v.UserName}" readonly>
                                    </div>
                                    <div class="ui-form-item ui-form-item-show ui-border-b">
                                        <label for="#">创建日期：</label>
                                        <input type="datetime" value="{$v.CreateDate|date='Y-m-d H:i:s',###}" readonly>
                                    </div>
                                    <div class="ui-form-item ui-form-item-show ui-border-b">
                                        <label id="lbl_total{$v.OrderId}" for="#">应付金额：</label>
                                        <input type="text" value="{$v.Total}">
                                    </div>
                                    <div class="ui-btn-group" style="margin:10px 0px 10px 0px;">
                                        <button  onclick="setActionState('是否确认取消订单？',1,this);" id="btn_cancel{$v.OrderId}" class="ui-btn-lg">
                                            <i style="font-size:20px;color:#00a5e0;" class="icon iconfont">&#xe63d;</i>
                                            取消
                                        </button>
                                        <button type="button" onclick="setActionState('是否立即支付？',2,this);" id="btn_pay{$v.OrderId}" class="ui-btn-lg ui-btn-primary">
                                            <i style="font-size:20px;color:white;" class="icon iconfont">&#xe63c;</i>
                                            支付
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </foreach>
                    </li>
                    <!--待发货-->
                    <li class="flagax">
                        <foreach name="oList2" item="v">
                            <div class="ui-form ui-border-t" style="margin-top:-1px;">
                                <form action="#">
                                    <div id="div_menu{$v.OrderId}" class="ui-form-item ui-form-item-show ui-border-b" onclick="hiDiv(this);">
                                        <label for="#">订单编号：</label>
                                        <input style="font-size:13px;" type="text" value="#{$v.OrderId}" readonly>
                                    </div>
                                    <div id="order_Info{$v.OrderId}" style="display:none;">
                                        <div>
                                            <foreach name="v[0]" item="sv">
                                                <ul class="ui-list ui-list-one ui-border-tb" style="border-top:0px;">
                                                <li class="ui-border-t">
                                                    <div class="ui-list-thumb">
                                                        
                                                        <span onclick="GotoProDetail({$sv.ProId});" style="background-image:url('__PUBLIC__/images/img/{$sv.ProImg}')"></span>
                                                    </div>
                                                    <div class="ui-list-info">
                                                        <h4 onclick="GotoProDetail({$sv.ProId});" class="ui-nowrap">{$sv.ProName}</h4>
                                                        <div class="ui-txt-info">{$sv.ProCount} * {$sv.ProPrice}</div>
                                                    </div>
                                                </li>
                                            </ul>
                                            </foreach>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">收货地址：</label>
                                            <input type="text" value="{$v.Address}" readonly>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">收件人：</label>
                                            <input type="text" value="{$v.UserName}" readonly>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">付款日期：</label>
                                            <input type="datetime" value="{$v.payDate|date='Y-m-d H:i:s',###}" readonly>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label id="lbl_total{$v.OrderId}" for="#">付款金额：</label>
                                            <input type="text" value="{$v.Total}">
                                        </div>
                                        <div class="ui-btn-group" style="margin:10px 0px 10px 0px;">
                                            <button type="button" onclick="notifyMaster();" id="btn_cancel{$v.OrderId}" class="ui-btn-lg">
                                                <i style="font-size:20px;color:#00a5e0;" class="iconfont icon-xiaoxi"></i>
                                                提醒发货
                                            </button>
                                            <button type="button" onclick="callMaster();" id="btn_pay{$v.OrderId}" class="ui-btn-lg ui-btn-primary">
                                                <i style="font-size:20px;color:white;" class="iconfont icon-31dianhua"></i>
                                                联系卖家
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </foreach>
                    </li>
                    <!--待收货-->
                    <li  class="flagax">
                        <foreach name="oList3" item="v">
                            <div class="ui-form ui-border-t"  style="margin-top:-1px;">
                                <form action="#">
                                    <div id="div_menu{$v.OrderId}" class="ui-form-item ui-form-item-show ui-border-b" onclick="hiDiv(this);">
                                        <label for="#">订单编号：</label>
                                        <input style="font-size:13px;" type="text" value="#{$v.OrderId}" readonly>
                                    </div>
                                    <div id="order_Info{$v.OrderId}" style="display:none;">
                                        <div>
                                            <foreach name="v[0]" item="sv">
                                                <ul class="ui-list ui-list-one ui-border-tb" style="border-top:0px;">
                                                <li class="ui-border-t">
                                                    <div class="ui-list-thumb">
                                                        
                                                        <span onclick="GotoProDetail({$sv.ProId});" style="background-image:url('__PUBLIC__/images/img/{$sv.ProImg}')"></span>
                                                    </div>
                                                    <div class="ui-list-info">
                                                        <h4 onclick="GotoProDetail({$sv.ProId});" class="ui-nowrap">{$sv.ProName}</h4>
                                                        <div class="ui-txt-info">{$sv.ProCount} * {$sv.ProPrice}</div>
                                                    </div>
                                                </li>
                                            </ul>
                                            </foreach>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">收货地址：</label>
                                            <input type="text" value="{$v.Address}" readonly>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">收件人：</label>
                                            <input type="text" value="{$v.UserName}" readonly>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">发货日期：</label>
                                            <input type="datetime" value="{$v.sendDate|date='Y-m-d H:i:s',###}" readonly>
                                        </div>
 
                                        <div class="ui-btn-group" style="margin:10px 0px 10px 0px;">
                                            <button type="button" onclick="lookTrends();" id="btn_pay{$v.OrderId}" class="ui-btn-lg ">
                                                <i style="font-size:20px;color:#00a5e0;" class="iconfont icon-31daishouhuo"></i>
                                                查看物流
                                            </button>
                                            <button type="button" onclick="setActionState('是否确认已经收到商品，立即确认收货？',3,this);" id="btn_pay{$v.OrderId}" class="ui-btn-lg ui-btn-primary">
                                                 <i style="font-size:20px;color:white;" class="iconfont icon-31daifahuo"></i>
                                                确认收货
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </foreach>
                    </li>
                    <!--已完成-->
                    <li  class="flagax">
                        <foreach name="oList4" item="v">
                            <div class="ui-form ui-border-t" style="margin-top:-1px;">
                                <form action="#">
                                    <div id="div_menu{$v.OrderId}" class="ui-form-item ui-form-item-show ui-border-b" onclick="hiDiv(this);">
                                        <label for="#">订单编号：</label>
                                        <input style="font-size:13px;" type="text" value="#{$v.OrderId}" readonly>
                                    </div>
                                    <div id="order_Info{$v.OrderId}" style="display:none;" >
                                        <div>
                                            <foreach name="v[0]" item="sv">
                                                <ul class="ui-list ui-list-one ui-border-tb" style="border-top:0px;">
                                                <li class="ui-border-t" >
                                                    <div class="ui-list-thumb">
                                                        
                                                        <span onclick="GotoProDetail({$sv.ProId});" style="background-image:url('__PUBLIC__/images/img/{$sv.ProImg}')"></span>
                                                    </div>
                                                    <div class="ui-list-info" style="padding-right:5px;">
                                                        <h4 onclick="GotoProDetail({$sv.ProId});" class="ui-nowrap">{$sv.ProName}</h4>
                                                        <div class="ui-txt-info">{$sv.ProCount} * {$sv.ProPrice}</div>
                                                        <i style="margin-left:15px"  class="iconfont icon-31pinglun"  onclick="acValuationFrame(this,{$sv.ProId},2);"></i>
                                                    </div>
                                                    
                                                </li>
                                            </ul>
                                            </foreach>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">收货地址：</label>
                                            <input type="text" value="{$v.Address}" readonly>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">收件人：</label>
                                            <input type="text" value="{$v.UserName}" readonly>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label for="#">成交日期：</label>
                                            <input type="datetime" value="{$v.conDate|date='Y-m-d H:i:s',###}" readonly>
                                        </div>
                                        <div class="ui-form-item ui-form-item-show ui-border-b">
                                            <label id="lbl_total{$v.OrderId}" for="#">成交金额：</label>
                                            <input type="text" value="{$v.Total}">
                                        </div>
                                        <div class="ui-btn-group" style="margin:10px 0px 10px 0px;">
                                            <button onclick="againBuy();" id="btn_cancel{$v.OrderId}" class="ui-btn-lg">
                                                 <i style="font-size:20px;color:#00a5e0;" class="iconfont icon-cart"></i>
                                                再次购买
                                            </button>
                                            <button type="button" onclick="postService();" id="btn_pay{$v.OrderId}" class="ui-btn-lg ui-btn-primary">
                                                <i style="font-size:20px;color:white;" class="iconfont icon-31daipingjia"></i>
                                                申请售后
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </foreach>
                    </li>
                </ul>
            </div>
            <!--弹出面板框-->     
            <div class="ui-dialog" >
                <div class="ui-dialog-cnt">
                    <div id="div_Yn" >
                        <div class="ui-dialog-bd">
                            <div id="dialog_content">是否确认操作?</div>
                        </div>
                        <div class="ui-dialog-ft ui-btn-group">
                            <button onclick="$('.ui-dialog').addClass('show').hide()" id="dialogButton2">取消</button> 
                            <button onclick="handleResult();" id="dialogButton1">确定</button>
                        </div>
                    </div>
                    <div id="div_Wl" style="border-radius: 10px;padding:10px;background-color:white;overflow:auto;height:200px;width:300px;" >
                        <p onclick="$('.ui-dialog').addClass('show').hide();"  class="ui-nowrap" style="float:right;">×</p>
                        <p style="text-align:center;font-size:20px;" >最新物流</p>
                        <p style="text-align:center;font-size:15px;margin:5px;color:#888">2016年4月10日15:06:44 | 杭州集散中心发往 》》温州集散中心</p>
                    </div>
                </div>
            </div>
                
        </section>
	</body>

</html>